package com.qiyue.admin.rpc;

import com.qiyue.admin.constant.AdminCommonConstant;
import com.qiyue.admin.rpc.service.PermissionService;
import com.qiyue.api.vo.user.UserInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by y747718944 on 2018/2/7
 *  该类主要用于验证用户权限，以及登录验证
 */
@RestController
@RequestMapping(AdminCommonConstant.URL.URI_API)
public class UserRest {

    @Autowired
    private PermissionService permissionService;



    @PostMapping("/user/validate")
    @ApiOperation("验证用户信息")
    public UserInfo validate(String account,String paw){
        return permissionService.validate(account,paw);
    }



}
